package com.bawei.publish

import com.alibaba.android.arouter.launcher.ARouter
import com.bawei.base.RoutePath
import com.bawei.common.mvi.BaseMviFragment
import com.bawei.ffmpeg.FFmpegUtil
import com.bawei.publish.databinding.FragmentPublishBinding
import dagger.hilt.android.AndroidEntryPoint
import io.microshow.rxffmpeg.RxFFmpegSubscriber

@AndroidEntryPoint
class PublishFragment : BaseMviFragment<FragmentPublishBinding>() {

    override fun getLayoutId(): Int = R.layout.fragment_publish

    override fun initViews() {

        //开始录制视频
        mDataBinding.llStartCramer.setOnClickListener {
            ARouter.getInstance().build(RoutePath.PATH_RECORDER_PAGE).navigation()
        }



    }

    private fun videoEncode(resourcesPath: String, targetPath: String){
        FFmpegUtil.runFFmpegCommands(resourcesPath,targetPath, object : RxFFmpegSubscriber(){
            override fun onError(message: String?) {

            }

            override fun onFinish() {

            }

            override fun onProgress(progress: Int, progressTime: Long) {

            }

            override fun onCancel() {

            }
        })

    }


}